Imports DotNetNuke
Imports System.Web.UI
Imports DotNetNuke.UI.Utilities
Imports WindowsLive
Imports DotNetNuke.Services.Exceptions.Exceptions
Imports DotNetNuke.Common

Namespace DNNCorp.Modules.LiveMessenger

    Partial Class LiveApplicationSkinObject
        Inherits DotNetNuke.UI.Skins.SkinObjectBase


#Region "Fields"
        Private wll As WindowsLiveLogin = New WindowsLiveLogin(True)
#End Region

#Region "Event Handlers"

        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Try
                If Not Page.IsPostBack Then
                End If

                Page.ClientScript.RegisterClientScriptInclude("LiveMessenger", "http://www.wlmessenger.net/api/3.0/loader.js")
                Page.ClientScript.RegisterClientScriptBlock(Me.Page.GetType(), "LiveLoader", "Microsoft.Live.Core.Loader.load(['messenger.ui', 'messenger.ui.styles.core']);", True)

            Catch exc As Exception
                ProcessModuleLoadException(Me, exc)
            End Try
        End Sub

#End Region

#Region "Properties"

        Protected ReadOnly Property ApplicationVerifier() As String
            Get
                Return wll.GetAppVerifier()
            End Get
        End Property

        Protected ReadOnly Property Channel() As String
            Get
                Return Page.ClientScript.GetWebResourceUrl(wll.GetType(), "Channel.html")
            End Get
        End Property

        Protected ReadOnly Property Privacy() As String
            Get
                Return NavigateURL("Privacy")
            End Get
        End Property

        Protected ReadOnly Property RefreshToken() As String
            Get
                Return Me.ResolveUrl("~/RefreshMessengerToken.aspx")
            End Get
        End Property

#End Region

    End Class

End Namespace
